﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ICM_Number_Cut_Stock.aspx.cs" Inherits="KPIS.GERP.GIMS.APP.APP_UI.Add_Form.ICM_Number_Cut_Stock" %>

<html>
<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    <title>แก้ไขจำนวนที่ยอมตัดคลังจริง</title>
    <link rel="StyleSheet" href="../../Styles/StyleSheet.css" type="text/css"/>
    <link rel=
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" >
</asp:ScriptManager>
<script type="text/javascript">
                       function GetRadWindow() 
                       {
                            var oWindow = null;
                            if (window.radWindow)
                                oWindow = window.RadWindow; 
                            else if (window.frameElement.radWindow)
                                oWindow = window.frameElement.radWindow; 
                            return oWindow;
                        }
                       function CloseWindow() 
                       {
                             GetRadWindow().Close();
                       }
</script>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
                   <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="Panel1">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="Panel2" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                        <telerik:AjaxSetting AjaxControlID="Panel2">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="Panel2" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                        <telerik:AjaxSetting AjaxControlID="grdInventoryFIFO">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="grdInventoryFIFO" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                   </AjaxSettings>
</telerik:RadAjaxManager>     
 <div class="moduleContent490">
                    <div class="moduleDivBottom490">
                             <asp:Panel ID="Panel1" runat="server" CssClass="contentPaneDiv" Height="150px" Width="470px"  ScrollBars="Auto" align = "center" >             
                                        <table>
                                              <br />
                                              <tr>
                                                    <td  width="120px" >
                                                          <asp:Label ID="hmovementcode" runat = "server" Visible = "false" />
                                                          <asp:Label ID="hrequisiton_des_item" runat = "server" Visible = "false" />
                                                          <asp:Label ID="hJobSiteSeq" runat ="server" Visible = "false" />
                                                          <asp:Label ID="hicm_res_item_seq" runat = "server" Visible = "false" />
                                                          <asp:Label ID="hreceive_seq" runat = "server" Visible = "false" />
                                                          <asp:Label ID="hQuantity" runat = "server" Visible = "false" />
                                                          <asp:Label ID="hCutstock" runat = "server" Visible ="false" />
                                                          <asp:Label ID="hRealQuantity" runat = "server" Visible = "false" />
                                                          <asp:Label ID="hCountLineCutstock" runat = "server" Visible= "false" />
                                                          <asp:Label ID="hrequisition_code" runat = "server" Visible= "false" />
                                                          <asp:Label CssClass="font-label" ID="lblInventory" runat ="server" Text = "พัสดุที่เบิก : " />
                                                    </td>
                                                    <td  >
                                                          <asp:Label CssClass="font-label" ID="pInventory" runat ="server"  />
                                                    </td>
                                              </tr>
                                              <tr>
                                                    <td>
                                                          <asp:Label CssClass="font-label" ID= "lblRequestQuantity" runat ="server" Text ="จำนวนที่ขอเบิก : " />
                                                    </td>
                                                    <td>
                                                          <telerik:RadTextBox ID="txtRequestQuantity" runat = "server" Enabled="false"  />
                                                    </td>
                                              </tr>
                                              <tr>
                                                    <td width="120px">
                                                          <asp:Label CssClass="font-label" ID= "lblRealQuantity" runat = "server" Text = "จำนวนที่อนุญาติให้เบิก :" />
                                                    </td>
                                                    <td>
                                                          <telerik:RadTextBox ID="txtRealQuantity" runat = "server"  />
                                                    </td>
                                              </tr>
                                              <tr>
                                                    <td>
                                                         <asp:LinkButton ID="btnCompare" runat="server" CssClass="LinkButton" Visible="true" onclick="btnCompare_Click">
                                                                <img style="border:0px;vertical-align:middle;" alt="" src="../Image/Button/Compare.gif" width="30px" height="30px"/>&nbsp;&nbsp;เปรียบเทียบการตัดจากคลัง
                                                          </asp:LinkButton>
                                                    </td>
                                                    <%--<td >
                                                          <asp:LinkButton ID="btnCancel" runat="server" CssClass="LinkButton" Visible="true" onclick="btnCancel_Click">
                                                                <img style="border:0px;vertical-align:middle;" alt="" src="../Image/Button/Cancel.png" width="30px" height="30px"/>&nbsp;&nbsp;ยกเลิกการเปรียบเทียบตัดจากคลัง
                                                          </asp:LinkButton>
                                                    </td>--%>
                                                    <td >
                                                          <asp:LinkButton ID="btnSave" runat="server" CssClass="LinkButton" Visible="true" onclick="btnSave_Click">
                                                                <img style="border:0px;vertical-align:middle;" alt="" src="../Image/Button/btnSave.gif" width="30px" height="30px"/>&nbsp;&nbsp;บันทึกข้อมูล
                                                          </asp:LinkButton>
                                                    </td>
                                                    
                                              </tr>
                                        </table>
                             </asp:Panel>
                    </div>
 </div>                   
 <div class="moduleContent490">
                    <div class="moduleDivBottom490">
                             <asp:Panel ID="Panel2" runat="server" CssClass="contentPaneDiv" Height="238px" Width="470px" ScrollBars="Auto" align = "center" >             
                                        <table align="center">
                                                <tr>
                                                        <td>
                                                                 <telerik:RadGrid ID="grdInventoryFIFO" runat="server" AutoGenerateColumns="false"
                                                                            AllowMultiRowEdit="false" AllowMultiRowSelection="true" ShowStatusBar="true"
                                                                            Width="450px" Height="220px" AllowPaging="true" AllowFilteringByColumn="true"
                                                                            GroupingSettings-GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;"
                                                                            GroupingSettings-GroupContinuedFormatString="" 
                                                                            GroupingSettings-GroupContinuesFormatString=""
                                                                            GroupingSettings-GroupSplitFormat=""
                                                                            OnNeedDataSource="grdInventoryFIFO_NeedDataSource" align ="left">
                                                                            <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" GroupLoadMode="Client"
                                                                                DataKeyNames="icm_receive_seq" NoMasterRecordsText="< ไม่มีข้อมูล >" GroupsDefaultExpanded="true">
                                                                                <RowIndicatorColumn>
                                                                                    <HeaderStyle Width="20px" />
                                                                                </RowIndicatorColumn>
                                                                                <ExpandCollapseColumn>
                                                                                    <HeaderStyle Width="20px" />
                                                                                </ExpandCollapseColumn>
                                                                                <Columns>   
                                                                                    <%--<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="25px" Visible="true" >
                                                                                           <HeaderStyle Width="25px" />
                                                                                    </telerik:GridClientSelectColumn>--%>
                                                                                    <telerik:GridBoundColumn DataField="icm_receive_seq" 
                                                                                        UniqueName="icm_receive_seq"
                                                                                        FilterControlWidth="100%" AutoPostBackOnFilter="true" 
                                                                                        CurrentFilterFunction="Contains" ShowFilterIcon="false" Visible="false" >
                                                                                    </telerik:GridBoundColumn>
                                                                                    <telerik:GridBoundColumn DataField="icm_res_item_seq" 
                                                                                        UniqueName="icm_res_item_seq" 
                                                                                        FilterControlWidth="100%" AutoPostBackOnFilter="true" 
                                                                                        CurrentFilterFunction="Contains" ShowFilterIcon="false" Visible="false" >
                                                                                    </telerik:GridBoundColumn>
                                                                                    <telerik:GridBoundColumn DataField="movement_code" 
                                                                                        UniqueName="movement_code"
                                                                                        FilterControlWidth="100%" AutoPostBackOnFilter="true" 
                                                                                        CurrentFilterFunction="Contains" ShowFilterIcon="false" Visible="false" >
                                                                                    </telerik:GridBoundColumn>
                                                                                    <telerik:GridBoundColumn DataField="receive_date" sortexpression="receive_date"
                                                                                        HeaderText="วันที่รับเข้า" UniqueName="receive_date" DataFormatString = "{0:D}"
                                                                                        FilterControlWidth="100%" AutoPostBackOnFilter="true" AllowFiltering = "true"
                                                                                        CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Width="109px"
                                                                                        HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                                                    </telerik:GridBoundColumn>
                                                                                    <telerik:GridBoundColumn DataField="icm_res_item_name" 
                                                                                        HeaderText="รายการที่เบิก" UniqueName="icm_res_item_name"
                                                                                        FilterControlWidth="100%" AutoPostBackOnFilter="true" AllowFiltering = "true"
                                                                                        CurrentFilterFunction="Contains" ShowFilterIcon="false"
                                                                                        HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                                                    </telerik:GridBoundColumn>
                                                                                    <telerik:GridBoundColumn DataField="quantity_remain_before" 
                                                                                        HeaderText="จำนวนพัสดุในคลัง" UniqueName="quantity_remain_before" HeaderStyle-Width="100px"
                                                                                        FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                                                                        CurrentFilterFunction="Contains" ShowFilterIcon="false" 
                                                                                        HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                                                    </telerik:GridBoundColumn>
                                                                                    <telerik:GridBoundColumn DataField="quantity_remain_after" 
                                                                                        HeaderText="จำนวนพัสดุในคลังหลังลองตัดเบิก" UniqueName="quantity_remain_after" HeaderStyle-Width="100px"
                                                                                        FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                                                                        CurrentFilterFunction="Contains" ShowFilterIcon="false" 
                                                                                        HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                                                    </telerik:GridBoundColumn>
                                                                                </Columns>
                                                                                <PagerStyle Mode="NumericPages" AlwaysVisible="true" 
                                                                                    FirstPageToolTip="กลับหน้าแรก" LastPageToolTip="ไปหน้าสุดท้าย" 
                                                                                    NextPagesToolTip="หน้าถัดไป" NextPageToolTip="หน้าถัดไป" 
                                                                                    PrevPagesToolTip="ย้อนกลับ" PrevPageToolTip="ย้อนกลับ" />
                                                                                </MasterTableView>
                                                                    <GroupingSettings GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;" 
                                                                        GroupContinuedFormatString="" GroupContinuesFormatString="" 
                                                                        GroupSplitFormat="" />
                                                                    <ClientSettings EnableRowHoverStyle="True">
                                                                        <Selecting AllowRowSelect="true" />
                                                                        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                                                                    </ClientSettings>
                                                                </telerik:RadGrid> 
                                                        </td>
                                                </tr>
                                        </table>
                             </asp:Panel>
                   </div>
</div>                                                 
</form>
</body>
</html>
